<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>编辑企业服务</title>


<link href="${base}/resources/admin/css/amazeui.css" rel="stylesheet" type="text/css" /><link href="${base}/resources/admin/css/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/resources/admin/js/jquery.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.validate.js"></script>
<script type="text/javascript" src="${base}/resources/admin/editor/kindeditor.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/common.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/input.js"></script>
<script type="text/javascript">
$().ready(function() {

	var $inputForm = $("#inputForm");
	var $browserButton = $("#browserButton");
	
	[@flash_message /]
	
	$browserButton.browser();
	
	// 表单验证
	$inputForm.validate({
		rules: {
            quota: "required",
            sn: "required"
		}
	});
	
});
</script>
</head>
<body>
	<div class="path">
		<a href="${base}/asl-admin/common/index.htm">${message("admin.path.index")}</a> &raquo; 充值赠品
	</div>
	<form id="inputForm" action="update.htm" method="post">
		<input type="hidden" name="id" value="${(giveaway.id!"")}" />
		<table class="input">
            <tr>
                <th> 赠品活动开始日期: </th>
                <td colspan="2">
                    <input type="text" id="startDate" name="startDate" class="text Wdate" value="${(giveaway.startDate!"")}"
                           onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd HH:mm:ss', maxDate: '#F{$dp.$D(\'endDate\')}'});"/>&nbsp;&nbsp;
                    该项为空时表示保存之后立即有效
                </td>
            </tr>
            <tr>
                <th> 赠品活动结束日期: </th>
                <td colspan="2">
                    <input type="text" id="endDate" name="endDate" class="text Wdate" value="${(giveaway.endDate!"")}"
                           onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd HH:mm:ss', minDate: '#F{$dp.$D(\'startDate\')}'});"/>&nbsp;&nbsp;
                    该项为空时表示保存之后可永久领取
                </td>
            </tr>
            <tr>
                <th>
                    <span class="requiredField">*</span>最低充值额度:
                </th>
                <td>
                    <input type="text" name="quota" class="text" maxlength="200" id="quota"  value="${(giveaway.quota!"")}"/>&nbsp;&nbsp;  单位: 元
                </td>
            </tr>
            <tr>
                <th> <span class="requiredField">*</span> 赠品项 </th>
                <td>
                    <input type="text" name="sn" id="sn" class="text" maxlength="200"  value="${(giveaway.product.sn)!""}"/>&nbsp;&nbsp; <span id="proTxt">填入商品编号查找商品</span>
                </td>
            </tr>
            <tr>
                <th> 赠品项标题 </th>
                <td>
                    <input type="text" name="title" class="text" maxlength="200" value="${(giveaway.title!"")}"/>&nbsp;&nbsp; 该项为空时默认生成标题 “充值满 <span id="quotaText">__</span> 元赠品”
                </td>
            </tr>

            <tr>
                <th>
                    &nbsp;
                </th>
                <td>
                    <input type="submit" class="button" value="${message("admin.common.submit")}"/>
                    <input type="button" class="button" value="${message("admin.common.back")}"
                           onclick="location.href='list.htm'"/>
                </td>
            </tr>
		</table>
	</form>
</body>
</html>
